﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using NClass.Core;
using NClass.TestHelper;

namespace NClass.Test.Core.Members
{
	[TestClass]
	public class OperationTest
	{
		[TestMethod]
		[TestCategoryAttribute("Code Analysis")]
		public void CopyFromParameterValidation()
		{
			var testClass = Resolver.CreateClass(Resolver.Language.CSharp);
			var methodOperation = testClass.AddMethod() as Operation;
			object result = null;
			string errorMessage = string.Empty;
			Assert.AreEqual(MethodValidator.Result.Succeeded,
				MethodValidator.CheckParameterValidation<Operation>(methodOperation, "CopyFrom", "OperationTest", "CopyFromParameterValidation", out errorMessage, out result),
				errorMessage);
		}
	}
}
